$(function(){
	var str = location.search;
	var type = str.substr(6);
	  	
	// alert(type);
	if (type=="index") {
		$("#index").addClass("weui-bar__item_on");
		$("#index").find("img:nth-of-type(2)").css("display","inline-block");
		$("#index").find("img:nth-of-type(1)").css("display","none");	
	}else if (type=="vip") {
		$("#vip").addClass("weui-bar__item_on");
		$("#vip").find("img:nth-of-type(2)").css("display","inline-block");
		$("#vip").find("img:nth-of-type(1)").css("display","none");	
	}else if (type=="classfiy") {
		$("#classfiy").addClass("weui-bar__item_on");
		$("#classfiy").find("img:nth-of-type(2)").css("display","inline-block");
		$("#classfiy").find("img:nth-of-type(1)").css("display","none");	
	}else if (type=="buyCar") {
		$("#buyCar").addClass("weui-bar__item_on");
		$("#buyCar").find("img:nth-of-type(2)").css("display","inline-block");
		$("#buyCar").find("img:nth-of-type(1)").css("display","none");	
	}else if (type=="me") {
		$("#me").addClass("weui-bar__item_on");
		$("#me").find("img:nth-of-type(2)").css("display","inline-block");
		$("#me").find("img:nth-of-type(1)").css("display","none");	
	}
    $('.weui-tabbar__item').on('click', function () {
        $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
    });

});

